package com.cyl.manager.oms.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyl.h5.domain.vo.RecentlyBuyCVo;
import com.cyl.manager.oms.domain.entity.OrderItem;
import com.cyl.manager.oms.domain.vo.OrderItemVO;
import io.lettuce.core.dynamic.annotation.Param;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * 订单中所包含的商品Mapper接口
 *
 * @author zcc
 */
public interface OrderItemMapper extends BaseMapper<OrderItem> {
    /**
     * 查询订单中所包含的商品列表
     *
     * @param orderItem 订单中所包含的商品
     * @return 订单中所包含的商品集合
     */
    List<OrderItem> selectByEntity(OrderItem orderItem);

    //连表查询最近购买的订单信息，商品信息，用户信息，
    List<RecentlyBuyCVo> selectRecentlBuy(Long id);


    List<OrderItem> selectProduct(Long productId);

    List<OrderItemVO> getOrderItemList(@Param("orderId") Long orderId);


    List<OrderItemVO> getOrderItem(@Param("list") List<Long> list);
}
